package com.markus.basic.设计模式.工厂模式;

/**
 * Author:markusZhang
 * Date:Create in 2020/8/30 10:09
 * todo:
 */
public class ConcreteFactory implements Factory {
    @Override
    public PhoneProduct concreteFactory(String className) {
        if ("HuaWei".equalsIgnoreCase(className)){
            return new HuaWeiProduct();
        }else if ("xiaomi".equalsIgnoreCase(className)){
            return new XiaoMiProduct();
        }
        return null;
    }
}
